home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / pv3dv1.zip / PV3DV100.EXE / PV3D_VAL.BAS < prev    next >
BASIC Source File  |  1993-03-12  |  2KB  |  72 lines

  1. CLS
  2. '========================================================================
  3. PRINT "PV3D value animation file generator V1.00"
  4. PRINT "By L Lecointe Copyright 1993"
  5. PRINT
  6. PRINT "Sample program to generate a *.VAL file for the PV3D Modeler software"
  7. PRINT
  8. '========================================================================
  9.  
  10. 'flag parameter
  11. sx% = 1               'PV3D X scale (not POV scale)      float
  12. sy% = 2               'PV3D Y scale (not POV scale)      float
  13. sz% = 4               'PV3D Z scale (not POV scale)      float
  14. tx% = 8               'X axis translation                float
  15. ty% = 16              'Y axis translation                float
  16. tz% = 32              'Z axis translation                float
  17. rx% = 64              'X rotation in degre 0->360        int
  18. ry% = 128             'Y rotation in degre 0->360        int
  19. rz% = 256             'Z rotation in degre 0->360        int
  20. cr% = 512             'Red   colors 0.0->1.0             float
  21. cg% = 1024            'Green colors 0.0->1.0             float
  22. cb% = 2048            'Blue  colors 0.0->1.0             float
  23. ca% = 4096            'Alpha colors 0.0->1.0             float
  24. 'Constant
  25. control$ = "PV3D_VALUE"
  26. nbframe% = 0
  27. noused% = 0
  28. noused2 = 0
  29. flag% = &HFFFF
  30. degre.to.rad = 3.14116 / 180
  31.  
  32.  
  33. CLS
  34. INPUT "Input the file name      : ", name$
  35. INPUT "Imput the description file :", descrip$
  36. INPUT "Input the number of step : ", nbframe%
  37. INPUT "Input the start value    : ", startvalue
  38. INPUT "Input the end value      : ", endvalue
  39.  
  40. 'flag construction
  41. 'in this case all parameter are available  with this formula in PV3D
  42.  
  43. flag% = sx% + sy% + sz% + tx% + ty% + tz% + rx% + ry% + rz% + cr% + cg% + cb% + ca%
  44.  
  45. 'if only translation  and alpha
  46. 'flag% = tx% + ty% + tz%  + ca%
  47.  
  48. OPEN name$ FOR OUTPUT AS #1
  49. PRINT #1, control$
  50. PRINT #1, descrip$
  51. PRINT #1, nbframe%, noused%, flag%, noused2
  52. stepvalue = (endvalue - startvalue) / nbframe%
  53. FOR i = 1 TO nbframe%
  54. 'put the formula here
  55. 'sample formula
  56. '
  57. ' y=sin (startvalue)
  58. ' y=cos (startvalue)
  59. ' y=startvalue^2
  60. ' y=a*(startvalue)+b
  61.  
  62. y = SIN(startvalue * degre.to.rad)
  63. PRINT y
  64. PRINT #1, y
  65. startvalue = startvalue + stepvalue
  66. NEXT i
  67. CLOSE #1
  68.  
  69.  
  70.  
  71.  
  72.